package com.zz.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * 预案内容
 * @author zhouzi
 */
@Data
@ApiModel("预案内容")
public class Preplan implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    @TableId(type= IdType.AUTO)//主键自增
    @NotNull(message = "预案内容表主键不能为空")
    private Integer id;

    //活动编码
    @ApiModelProperty("活动编码")
    @NotNull(message = "活动编码不能为空", groups = {Insert.class, Delete.class})
    private Integer activityId;

    //负责人学号
    @ApiModelProperty("负责人学号")
    @NotNull(message = "负责人学号不能为空")
    @Range(min = 1000000000, message = "负责人学号为10位")
    private Integer leaderId;

    //预案内容
    @ApiModelProperty("预案内容")
    @NotNull(message = "预案内容不能为空", groups = {Insert.class})
    private String content;
}
